package com.ourteam.workspace.domain;
/**
 * Template Name : DTO数据对象
 * Template Version : 1
 * Template Last Modfiy Date : Fri Nov 30 16:49:33 CST 2018
 * Auto Generate Date : 2018-11-30 16:50:31
  * Warning ! This file will be overwrite when regenerate !
  * 
 */

import java.util.Map;
import java.util.HashMap;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.beanutils.BeanMap;
import net.dao.IDataPopulateCallback;


public class WorkspaceProductDatabaseRelateBean implements java.io.Serializable {

        
	private static Map<String,String> mappedDaoFields = new HashMap<String,String>();
    
	private com.ourteam.workspace.dao.WorkspaceProductDatabaseRelate workspaceProductDatabaseRelate;

	protected BeanMap getBeanMap(){
	
		return new BeanMap(workspaceProductDatabaseRelate);
	}
	
	static{
				
												
		mappedDaoFields.put("id",com.ourteam.workspace.dao.IWorkspaceProductDatabaseRelateDAO.Id);
		
																										
				
																																																
				
																
		mappedDaoFields.put("workspaceId",com.ourteam.workspace.dao.IWorkspaceProductDatabaseRelateDAO.WorkspaceId);
		
																						
				
																																																
				
																				
		mappedDaoFields.put("productDatabaseId",com.ourteam.workspace.dao.IWorkspaceProductDatabaseRelateDAO.ProductDatabaseId);
		
																		
				
																																																
				
																								
		mappedDaoFields.put("relateName",com.ourteam.workspace.dao.IWorkspaceProductDatabaseRelateDAO.RelateName);
		
														
				
																																																
				
																												
		mappedDaoFields.put("status",com.ourteam.workspace.dao.IWorkspaceProductDatabaseRelateDAO.Status);
		
										
				
																																																
				
																																
		mappedDaoFields.put("remarks",com.ourteam.workspace.dao.IWorkspaceProductDatabaseRelateDAO.Remarks);
		
						
				
																																																
				
																														
				
										
		mappedDaoFields.put("databaseName",com.ourteam.workspace.dao.IWorkspaceProductDatabaseRelateDAO.DatabaseName);
																																								
				
																														
				
																		
		mappedDaoFields.put("databaseType",com.ourteam.workspace.dao.IWorkspaceProductDatabaseRelateDAO.DatabaseType);
																																
				
																														
				
																										
		mappedDaoFields.put("databaseIp",com.ourteam.workspace.dao.IWorkspaceProductDatabaseRelateDAO.DatabaseIp);
																								
				
																														
				
																																		
		mappedDaoFields.put("databasePort",com.ourteam.workspace.dao.IWorkspaceProductDatabaseRelateDAO.DatabasePort);
																
				
																														
				
																																										
		mappedDaoFields.put("databaseServiceId",com.ourteam.workspace.dao.IWorkspaceProductDatabaseRelateDAO.DatabaseServiceId);
								
				
				
	}
	
	public static String getMappedDAOField(String aAttrName){
		return mappedDaoFields.get(aAttrName);
	}
	
	
	public WorkspaceProductDatabaseRelateBean() {
		super();
	    		
		this.workspaceProductDatabaseRelate = new com.ourteam.workspace.dao.WorkspaceProductDatabaseRelate();
                
	}
	
		
	public WorkspaceProductDatabaseRelateBean(com.ourteam.workspace.dao.WorkspaceProductDatabaseRelate workspaceProductDatabaseRelate) {
		super();
	
		this.workspaceProductDatabaseRelate = workspaceProductDatabaseRelate;
		
	}
		
		
		
    	
	public com.ourteam.workspace.dao.WorkspaceProductDatabaseRelate convertToWorkspaceProductDatabaseRelate(){
		return this.workspaceProductDatabaseRelate;
	}
	
	public com.ourteam.workspace.dao.WorkspaceProductDatabaseRelate convertTo(){
		return this.workspaceProductDatabaseRelate;
	}
	
			
		
			
			
		
	/**
	 * Get id
	 * 
	 * @return long
	 */
	public long getId(){
		return (long) this.workspaceProductDatabaseRelate.getId();
	}
	
	/**
	 * Set id
	 * 
	 * @parameter long
	 */
	public void setId(long id){
		
		this.workspaceProductDatabaseRelate.setId(id);
	}
		
													
			
																									
		
		
					
			
		
	/**
	 * Get workspaceId
	 * 
	 * @return long
	 */
	public long getWorkspaceId(){
		return (long) this.workspaceProductDatabaseRelate.getWorkspaceId();
	}
	
	/**
	 * Set workspaceId
	 * 
	 * @parameter long
	 */
	public void setWorkspaceId(long workspaceId){
		
		this.workspaceProductDatabaseRelate.setWorkspaceId(workspaceId);
	}
		
											
			
																									
		
		
							
			
		
	/**
	 * Get productDatabaseId
	 * 
	 * @return long
	 */
	public long getProductDatabaseId(){
		return (long) this.workspaceProductDatabaseRelate.getProductDatabaseId();
	}
	
	/**
	 * Set productDatabaseId
	 * 
	 * @parameter long
	 */
	public void setProductDatabaseId(long productDatabaseId){
		
		this.workspaceProductDatabaseRelate.setProductDatabaseId(productDatabaseId);
	}
		
									
			
																									
		
		
									
			
		
	/**
	 * Get relateName
	 * 
	 * @return String
	 */
	public String getRelateName(){
		return (String) this.workspaceProductDatabaseRelate.getRelateName();
	}
	
	/**
	 * Set relateName
	 * 
	 * @parameter String
	 */
	public void setRelateName(String relateName){
		
		this.workspaceProductDatabaseRelate.setRelateName(relateName);
	}
		
							
			
																									
		
		
											
			
		
	/**
	 * Get status
	 * 
	 * @return String
	 */
	public String getStatus(){
		return (String) this.workspaceProductDatabaseRelate.getStatus();
	}
	
	/**
	 * Set status
	 * 
	 * @parameter String
	 */
	public void setStatus(String status){
		
		this.workspaceProductDatabaseRelate.setStatus(status);
	}
		
					
			
																									
		
		
													
			
		
	/**
	 * Get remarks
	 * 
	 * @return String
	 */
	public String getRemarks(){
		return (String) this.workspaceProductDatabaseRelate.getRemarks();
	}
	
	/**
	 * Set remarks
	 * 
	 * @parameter String
	 */
	public void setRemarks(String remarks){
		
		this.workspaceProductDatabaseRelate.setRemarks(remarks);
	}
		
			
			
																									
		
		
														
			
					
			
		
	/**
	 * Get databaseName
	 * 
	 * @return String
	 */
	public String getDatabaseName(){
		
		return (String) this.workspaceProductDatabaseRelate.getDatabaseName();
			
	}
	
																					
		
		
														
			
									
			
		
	/**
	 * Get databaseType
	 * 
	 * @return String
	 */
	public String getDatabaseType(){
		
		return (String) this.workspaceProductDatabaseRelate.getDatabaseType();
			
	}
	
																	
		
		
														
			
													
			
		
	/**
	 * Get databaseIp
	 * 
	 * @return String
	 */
	public String getDatabaseIp(){
		
		return (String) this.workspaceProductDatabaseRelate.getDatabaseIp();
			
	}
	
													
		
		
														
			
																	
			
		
	/**
	 * Get databasePort
	 * 
	 * @return String
	 */
	public String getDatabasePort(){
		
		return (String) this.workspaceProductDatabaseRelate.getDatabasePort();
			
	}
	
									
		
		
														
			
																					
			
		
	/**
	 * Get databaseServiceId
	 * 
	 * @return String
	 */
	public String getDatabaseServiceId(){
		
		return (String) this.workspaceProductDatabaseRelate.getDatabaseServiceId();
			
	}
	
					
		
			
			
			
			
			
			
			
			
			
			
			
			
			
	
	public int hashCode() {
   		return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
 	}
	
		
	public boolean equals(Object obj) {
		if (obj == null) {
            return false;
        } // end if

        if ((obj instanceof WorkspaceProductDatabaseRelateBean) == false) {
            return false;
        } // end if

        WorkspaceProductDatabaseRelateBean other = (WorkspaceProductDatabaseRelateBean) obj;
        
        boolean isEqual = false;
        
                
        com.ourteam.workspace.dao.WorkspaceProductDatabaseRelate tempWorkspaceProductDatabaseRelate = other.convertToWorkspaceProductDatabaseRelate();
        
        if(tempWorkspaceProductDatabaseRelate == null || this.workspaceProductDatabaseRelate == null){
        	isEqual = false;
        }
        else if(tempWorkspaceProductDatabaseRelate == this.workspaceProductDatabaseRelate || tempWorkspaceProductDatabaseRelate.equals(this.workspaceProductDatabaseRelate) ){
        	isEqual = true;
        }
        else{
        	isEqual = false;
        }
        
        return isEqual;
	}
	
	
	public static WorkspaceProductDatabaseRelateBean[] toArray(com.ourteam.workspace.dao.WorkspaceProductDatabaseRelate[] aWorkspaceProductDatabaseRelates){
		
		return toArray(aWorkspaceProductDatabaseRelates,null);
	}
	
	public static WorkspaceProductDatabaseRelateBean[] toArray(com.ourteam.workspace.dao.WorkspaceProductDatabaseRelate[] aWorkspaceProductDatabaseRelates , IDataPopulateCallback aCallBack){
		 
		 if(ArrayUtils.isEmpty(aWorkspaceProductDatabaseRelates)){
		 	return new WorkspaceProductDatabaseRelateBean[0];
		 }
		 
		 int length = aWorkspaceProductDatabaseRelates.length;
		 
		 WorkspaceProductDatabaseRelateBean[] beans = new WorkspaceProductDatabaseRelateBean[length];
		  
		 for (int i = 0; i < length; i++) {
			beans[i] = new WorkspaceProductDatabaseRelateBean(aWorkspaceProductDatabaseRelates[i]);
			if(aCallBack != null){
			    aCallBack.populate(beans[i],new Object[]{aWorkspaceProductDatabaseRelates[i]});
			}
		 }
		 
		 return beans;
	 }
	 
	 	 
}